<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>保险服务</title>
  <link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
</head>
<body>
  <div class="container">
    <header class="header">
      <button class="back-btn" onclick="window.history.back()">←</button>
      <h2>保险服务</h2>
    </header>
    
    <!-- 我的保单 -->
    <div class="section">
      <h3>我的保单</h3>
      <div class="policy-list">
        <div class="policy-item">
          <div class="policy-icon">🏥</div>
          <div class="policy-info">
            <h4>医疗保险</h4>
            <p>保障中 · 有效期至2026-06-30</p>
          </div>
          <div class="policy-amount">¥480/年</div>
        </div>
        <div class="policy-item">
          <div class="policy-icon">🚗</div>
          <div class="policy-info">
            <h4>车险</h4>
            <p>保障中 · 有效期至2025-12-31</p>
          </div>
          <div class="policy-amount">¥2850/年</div>
        </div>
      </div>
      <button onclick="viewAllPolicies()" style="width: 100%; margin-top: 10px;">查看全部保单</button>
    </div>
    
    <!-- 推荐保险 -->
    <div class="section">
      <h3>推荐保险</h3>
      <div class="insurance-grid">
        <div class="insurance-item" onclick="viewInsurance('health')">
          <img src="{{ url_for('static', filename='img/jkx.png') }}" alt="健康险">
          <div class="insurance-info">
            <h4>百万医疗险</h4>
            <p>低至¥12/月起</p>
          </div>
        </div>
        <div class="insurance-item" onclick="viewInsurance('accident')">
          <img src="{{ url_for('static', filename='img/ywx.png') }}" alt="意外险">
          <div class="insurance-info">
            <h4>综合意外险</h4>
            <p>低至¥5.8/月起</p>
          </div>
        </div>
        <div class="insurance-item" onclick="viewInsurance('travel')">
          <img src="{{ url_for('static', filename='img/lx.png') }}" alt="旅行险">
          <div class="insurance-info">
            <h4>旅行意外险</h4>
            <p>低至¥3/天起</p>
          </div>
        </div>
        <div class="insurance-item" onclick="viewInsurance('property')">
          <img src="{{ url_for('static', filename='img/ccx.png') }}" alt="财产险">
          <div class="insurance-info">
            <h4>家庭财产险</h4>
            <p>低至¥68/年起</p>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 理赔服务 -->
    <div class="section">
      <h3>理赔服务</h3>
      <div class="claim-service">
        <div class="claim-item" onclick="startClaim()">
          <img src="{{ url_for('static', filename='img/sqlp.png') }}" alt="申请理赔">
          <p>申请理赔</p>
        </div>
        <div class="claim-item" onclick="checkClaim()">
          <img src="{{ url_for('static', filename='img/lpcx.png') }}" alt="理赔查询">
          <p>理赔查询</p>
        </div>
        <div class="claim-item" onclick="contactService()">
          <img src="{{ url_for('static', filename='img/kfzx.png') }}" alt="客服咨询">
          <p>客服咨询</p>
        </div>
      </div>
    </div>
  </div>
  
  <script>
    // 查看全部保单
    function viewAllPolicies() {
      alert('正在打开全部保单');
    }
    
    // 查看保险详情
    function viewInsurance(type) {
      const names = {
        'health': '健康险',
        'accident': '意外险',
        'travel': '旅行险',
        'property': '财产险'
      };
      alert(`正在查看${names[type]}详情`);
    }
    
    // 理赔服务
    function startClaim() {
      alert('正在申请理赔');
    }
    
    function checkClaim() {
      alert('正在查询理赔进度');
    }
    
    function contactService() {
      alert('正在联系客服');
    }
  </script>
  
  <style>
    .policy-list {
      margin-top: 10px;
    }
    
    .policy-item {
      display: flex;
      align-items: center;
      padding: 15px 0;
      border-bottom: 1px solid var(--border-color);
    }
    
    .policy-item:last-child {
      border-bottom: none;
    }
    
    .policy-icon {
      font-size: 24px;
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-right: 15px;
      background: #f0f0f0;
      border-radius: 50%;
    }
    
    .policy-info h4 {
      font-size: 16px;
      margin-bottom: 5px;
    }
    
    .policy-info p {
      font-size: 12px;
      color: var(--text-secondary);
    }
    
    .policy-amount {
      margin-left: auto;
      font-weight: 500;
      color: var(--primary-color);
    }
    
    .insurance-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      margin-top: 10px;
    }
    
    .insurance-item {
      border-radius: var(--radius-sm);
      overflow: hidden;
      position: relative;
      cursor: pointer;
      box-shadow: var(--shadow-sm);
      transition: var(--transition);
      background: var(--card-bg);
      border: 1px solid var(--border-color);
    }
    
    .insurance-item:hover {
      transform: translateY(-3px);
      box-shadow: var(--shadow-md);
    }
    
    .insurance-item img {
      width: 100%;
      height: 100px;
      object-fit: cover;
    }
    
    .insurance-info {
      padding: 10px;
    }
    
    .insurance-info h4 {
      font-size: 14px;
      margin-bottom: 5px;
    }
    
    .insurance-info p {
      font-size: 12px;
      color: var(--text-secondary);
    }
    
    .claim-service {
      display: flex;
      justify-content: space-around;
      margin-top: 15px;
    }
    
    .claim-item {
      text-align: center;
      width: 30%;
    }
    
    .claim-item img {
      width: 36px;
      height: 36px;
      margin-bottom: 8px;
    }
  </style>
</body>
</html>